/*
 * BanBu_SecondVerifyViewController
 * @description 本文件提供再次认证界面的ViewController
 * @package
 * @author 		***
 * @copyright
 * @version 		1.0
 * @description 本文件提供再次认证界面的ViewController
 */

#import "BanBu_SecondVerifyViewController.h"
#import "BanBu_VideoAuthenViewController.h"
#import "UIButton+WebCache.h"
#import "AppDataManager.h"
#import "BanBu_VIPAlert.h"
@interface BanBu_SecondVerifyViewController ()

@end

@implementation BanBu_SecondVerifyViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}
- (id)initWithVerifyPhoto:(NSString *)urlString
{
    self = [super init];
    if (self) {
        self.urlString = urlString;
    }
    return self;
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    [_reVerify setTitle:NSLocalizedString(@"reverify", nil) forState:UIControlStateNormal];
    _reVerifyNotice.text = NSLocalizedString(@"reverifyNotice", nil);
    _reVerifyNoticeDetail.text = NSLocalizedString(@"reverifyDetail", nil);
    [_verifiedPhoto setImageWithURL:[NSURL URLWithString:_urlString] placeholderImage:[UIImage imageNamed:@"default.png"] andType:0];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc {
    [_verifiedPhoto release];
    [_reVerify release];
    [_reVerifyNotice release];
    [_reVerifyNoticeDetail release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setVerifiedPhoto:nil];
    [self setReVerify:nil];
    [self setReVerifyNotice:nil];
    [self setReVerifyNoticeDetail:nil];
    [super viewDidUnload];
}
- (IBAction)reverify:(UIButton *)sender
{
    if([[[UserDefaults valueForKey:MyAppDataManager.useruid] valueForKey:@"userlevel"] integerValue]>0)
    {
        BanBu_VideoAuthenViewController *video = [[BanBu_VideoAuthenViewController alloc] initWithRegisterVerify:NO];
        [self.navigationController pushViewController:video animated:YES];
        [video release];
    }
    else
    {
        [[BanBu_VIPAlert shareInstance] GoVIPApplyViewAlertFor:self title:NSLocalizedString(@"sysNotice", nil) message:NSLocalizedString(@"vipcanverify", nil)];
    }

}
@end
